Conversation
…ermite interpolation Port Python kopdeltav/models.py to Rust as a separate workspace crate (crates/kopdeltav) to isolate core physics from Tauri dependencies. Includes: CurveKey, Atmosphere, OrbitalElements, CelestialBody structs, G0/R_GAS constants, compute_mu(), and KSP AnimationCurve-compatible hermite_interp(). All 11 tests pass, clippy clean.
Port the Python kopdeltav/parser.py to Rust with 1:1 logic parity. Two-layer design: low-level ConfigNode tree parser and high-level CelestialBody extractor. Handles comments, MM modifiers, delete directives, curve keys with tangent defaults, inline brace formats, unclosed brace recovery, and #LOC_ display name fallback.
Port all calculator functions from Python kopdeltav/calculator.py to Rust: - Orbital mechanics: low_orbit_altitude, circular/escape velocity - Atmospheric density via hermite-interpolated curves (kPa->Pa conversion) - Launch delta-V with empirical gravity/drag/jet estimation - Hohmann transfer (inward + outward) via vis-viva equation - Tsiolkovsky rocket equation for mass ratio - Geostationary orbit altitude and transfer delta-V - Escape/landing delta-V helpers - Multi-step route planner (compute_route) All 17 tests pass including reference value regression tests: - Sanctar escape velocity: 3802 m/s - Kerbin escape velocity: 3431 m/s - Sanctar surface density: 1.4096 kg/m3 - Sanctar launch rocket: ~3110 m/s, with jets: ~1982 m/s
Add system.rs with build_tree, is_barycenter, sort_by_transfer_dv, and scan_configs. Add i18n.rs with full ja/en/id translation tables and get_text/get_all_keys API with language fallback.
Replace the Python subprocess spawning architecture with native Rust Tauri commands that directly call the kopdeltav crate. Add state.rs for shared AppState (bodies + system tree) and commands.rs with 13 IPC handlers covering health, config upload, GameData scan, body listing/detail, launch/hohmann/tsiolkovsky calculations, system tree, destinations, route planning, atmosphere profiles, and moon queries. Remove tauri-plugin-shell dependency and Python resource bundling from tauri.conf.json.
Migrate all HTTP fetch-based API calls in useApi.ts to Tauri invoke() from @tauri-apps/api/core, update ConfigUpload.vue to read file as text before passing to invoke, and remove the vite dev server proxy config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kopdeltav/Python パッケージを Rust に 1:1 移植し、src-tauri/crates/kopdeltav/として独立 workspace crate 化invoke()) で直接フロントエンドから Rust を呼び出す構成に変更。Python サブプロセス・HTTP レイヤーを完全排除useApi.tsをfetch()→invoke()に移行run.py+kopdeltav/) は維持(デュアルメンテナンス)Architecture
Rust modules (1:1 port)
models.rsparser.rscalculator.rssystem.rsi18n.rscommands.rsTest plan
cargo test -p kopdeltav)cargo clippy -p kopdeltav -- -D warnings)pytest tests/ -v)pnpm type-check)pnpm build)cargo tauri dev)